﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
    <script src="/lib/date/wdatepicker.js"></script>
</head>
<body>
    <div class="data-wrap case">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch">

                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">公司名称：</label>
                        <input class="form-control" name="companyName" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">付款卡用户名：</label>
                        <input class="form-control" name="paymentCradName" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">付款金额(区间)：</label>                        
                        <input class="form-control wd75" name="startAmount" type="text" autocomplete="off" placeholder="起" />
                        <input class="form-control wd75" name="endAmount" type="text" autocomplete="off" placeholder="迄" />
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">客户姓名：</label>
                        <input class="form-control" name="clientAccountName" type="text" autocomplete="off">
                    </div>
                    <div class="input-group input-group-sm">
                        <label class="input-group-addon m5_l">付款时间：</label>
                        <input id="d421" class="Wdate wd125" name="startTime" type="text" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" autocomplete="off" />
                        --<input id="d422" class="Wdate wd125 m5_l" name="endTime" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'d421\')}'})" autocomplete="off" />
                    </div>
                    <button type="button" class="btn btn-default btn-sm active" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>

        <!--一高级搜索开始-->
        <div class="AdvSearch">
            <div class="AdvSearchcom collapse">
                <table>
                    <tbody>
                        <tr>
                            <td>付款姓名：</td>
                            <td><input type="text" class="form-control" value=""></td>
                            <td>通知 ：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                        <tr>
                            <td>退款流水：</td>
                            <td><input type="text" class="form-control" disabled value=""></td>
                            <td>退款人：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                        <tr>
                            <td>退款金额：</td>
                            <td><input type="text" class="form-control" value=""></td>
                        </tr>
                    </tbody>
                </table>
                <div class="AdvSearchfooter t_c">
                    <button id="search" class="btn btn-default" type="button">立即搜索</button>
                    <button id="cancel" data-dismiss="modal" class="btn btn-default m10_l" type="button">取消</button>
                </div>
            </div>
        </div>
        <!--高级搜索结束-->

        <div class="paging">
        </div>
    </div>

    <script type="text/x-dot-template" id="pgerTemplate">
        <div class="data-body data-scroll">
            <div class="data-view">
                <div class="data-div-view table-responsive">
                    <table class="table table-hover table-striped table-bordered">
                        <thead>
                            <tr>
                                <th class="t_l wd150">订单号</th>
                                <th class="t_l wd200">实际订单号</th>
                                <th class="t_l wd100">公司名称</th>
                                <th class="t_l wd100">银行名称</th>
                                <th class="t_l wd100">付款卡用户名</th>
                                <th class="t_l wd125">银行卡号</th>

                                <th class="t_r wd75">余额</th>
                                <th class="t_r wd75">付款金额</th>
                                <th class="wd130">付款时间</th>

                                <th class="t_l wd200">客户银行</th>
                                <th class="t_l wd100">客户姓名</th>
                                <th class="t_l wd125">客户卡号</th>
                                <th class="t_l wd150">已匹配单号</th>
                                <th class="t_l wd200">备注</th>
                                <th class="t_l wd250">机器ID</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{? it.tData && it.tData.length>0}}
                            {{~it.tData :item:index}}
                            <tr>
                                <td class="t_l wd150" title="{{= item.orderNo }}">{{?  item.orderNo}}{{= item.orderNo }}{{??}}{{?}}</td>
                                <td class="t_l wd200" title="{{= item.clientOrderNo }}">{{?  item.clientOrderNo}}{{= item.clientOrderNo }}{{??}}{{?}}</td>
                                <td class="t_l wd100" title="{{= item.companyNameEn }}">{{= item.companyName }}</td>
                                <td class="t_l wd100">{{= item.bankName }}</td>
                                <td class="t_l wd100">{{= item.cardName }}</td>
                                <td class="t_l wd125" title="{{= FlashPay.Util.SubCardNumber(item.cardNumber) }}">{{= FlashPay.Util.SubCardNumber(item.cardNumber) }}</td>

                                <td class="t_r bold wd75">{{= item.afterBalance }}</td>
                                <td class="t_r bold wd75">{{= item.amount }}</td>
                                <td class="wd130">{{= item.operatingDate.replace("T"," ") }}</td>

                                <td class="t_l wd200">{{= item.clientBankName }}</td>
                                <td class="t_l wd100">{{= item.clientAccountName }}</td>
                                <td class="t_l wd125" title="{{= FlashPay.Util.SubCardNumber(item.clientCardNumber) }}">{{= FlashPay.Util.SubCardNumber(item.clientCardNumber) }}</td>
                                <td class="t_l bold wd150">{{= item.matchOrderNo==null?"未匹配":item.matchOrderNo }}</td>
                                <td class="t_l wd200" title="{{= item.remark }}">{{?  item.remark}}{{= item.remark }}{{??}}{{?}}</td>
                                <td class="t_l wd250" title="{{= item.vmClientID }}">{{= item.vmClientID }}</td>

                            </tr>
                            {{~}}
                            {{??}}
                            <tr class="noRecord">
                                <td colspan="15">暂无记录！</td>
                            </tr>
                            {{?}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            $("input[name='startTime']").val(FlashPay.Util.GetDateStr(-1));
            $("input[name='endTime']").val(FlashPay.Util.GetDateStr(0));

            FlashPay.UI.DataAutoHeight();

            FlashPay.UI.Triggerbox({
                btnAdvSearch: '#AdvSearch',
                searchCallBack: function () {
                    console.info(1);
                },
                cancelCallBack: function () {

                }
            });

            $("#btnSearch").click(function () {
                FlashPay.UI.DoSearch();
            });

            FlashPay.UI.DoSearch();
        });

        $(document).keyup(function (event) {
            var keycode = event.which;
            if (keycode == 13) {
                FlashPay.UI.DoSearch();
            }
        });

        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }

        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "pgerTemplate", pageSize: 15, ajax: { url: "/Payment/RecordReal" } });
        }
    </script>
</body>
</html>